﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCDutyShiftEntry.aspx.cs" Inherits="MTRC.ODMS.Web.SOM.CodeSetup.SCDutyShiftEntry" %>

<%@ Register Assembly="APJ.Web.UI.WebControls" Namespace="APJ.Web.UI.WebControls"
    TagPrefix="APJ" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxControlToolkit" %>
<%@ Register Src="~/UserControl/Menu/PageFoot.ascx" TagName="PageFoot" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/TabStrip.ascx" TagName="TabStrip" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/PageHead.ascx" TagName="PageHead" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/MainMenu.ascx" TagName="MainMenu" TagPrefix="WebStructure" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Operational Data Management System</title>
     <link href="<%=ResolveUrl("~/CSS/common.css")%>" rel="stylesheet" type="text/css" />
    <link href="../../CSS/common.css" rel="stylesheet" type="text/css" />
    <script language="javascript" src="../../Javascript/CommonFunction.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
    var LeavePage='<%=this.GetMessage("COM_LeavePage")%>'
    function IsInteger(val)
    {
        var re;
        re = /^[0-9]*[1-9][0-9]*$/;
        return re.exec(val);	        
    }
    
    function CheckInt(obj)
    {         
      if (obj.value!="")
      {
            if (!IsInteger(obj.value))
            {         
              obj.value=obj.title;       
              return false;
            }      
            else
                  return true;
      }
      else
         return true;      
    }  
    function CheckCriteria()
    {
        if(trim(document.getElementById("txtCatEN").value)=="")
        {
            alert("");
            return false;
        }
    }  

    
        function Void(message)
        {//debugger;
            if(document.getElementById("chkVoid").checked==true)
            {
                if(confirm(message))
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
            return true;
            
        }
        
    function New() 
    {
        
        if (IsServerChanged || IsPageChanged())
        {
            if(confirm(LeavePage))
            {             
               window.location.href = "SCDutyShiftEntry.aspx";
            }
        }
        else
        {
           window.location.href="SCDutyShiftEntry.aspx";
        }
        return false;
    }
    
    function Cancel() 
    {
        
        if (IsServerChanged || IsPageChanged())
        {
            if(confirm(LeavePage))
            {             
               window.location.href = "SCDutyShiftList.aspx";
            }
        }
        else
        {
           window.location.href="SCDutyShiftList.aspx";
        }
        return false;
    }
    </script>

    <link href="~/CSS/Menu.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">  
        <AjaxControlToolkit:ToolkitScriptManager ID="ToolkitScriptManager" runat="server">
        </AjaxControlToolkit:ToolkitScriptManager>      
            <table border="0" cellpadding="0" cellspacing="0" class="Page_Container">
                <tr>
                   <td colspan="2" class="Page_Head">
                        <WebStructure:PageHead ID="PageHead" runat="server" />
                    </td>
                </tr>               
                <tr>
                    <td class="Page_Left">
                        <WebStructure:MainMenu ID="MainMenu" runat="server" AppPath="../../" CurrMenuID="M140915" />
                    </td>
                    <td class="Page_Right">
                       <table class="Page_Contents">
                          <tr>
                            <td class="TabStrip"><WebStructure:TabStrip ID="TabStrip" CurrMenuID="M140815" ParentMenuID="M140915" DMenuMode="CurrOnly" runat="server" /></td>
                          </tr>
                          <tr>
                            <td class="Contents" style="height: 16px">
                             
                             <!--**********context Begin *****************-->
                                  
                                <fieldset>
                                <legend class="Title1">
                                    <asp:Label ID="lblTitle" runat="server" Text=""></asp:Label></legend>
                                   <table border="0" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td  align="right">
                                            <asp:Label ID="lblShiftCode1" runat="server" Text="Shift Code1"></asp:Label><em>*</em>
                                        </td>
                                        <td align="left">
                                            <asp:TextBox ID="txtShiftCode1" runat="server" MaxLength="10" Width="100"></asp:TextBox><asp:HiddenField ID="hidID" runat="server" />
                                        </td>
                                        <td></td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td align="right">
                                            <asp:Label ID="lblShiftCode2" runat="server" Text="Shift Code2"></asp:Label><em>*</em></td>
                                        <td>
                                            <asp:TextBox ID="txtShiftCode2" runat="server" MaxLength="10" Width="100"></asp:TextBox></td>
                                            <td></td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td align="right">
                                            <asp:Label ID="lblShiftCode3" runat="server" Text="Shift Code3"></asp:Label><em>*</em></td>
                                        <td>
                                            <asp:TextBox ID="txtShiftCode3" runat="server" MaxLength="10" Width="100"></asp:TextBox></td>
                                            <td></td>
                                        <td></td>
                                    </tr>
                                       <tr>
                                           <td align="right">
                                            <asp:Label ID="lblDescription" runat="server" Text="Description"></asp:Label><em>*</em></td>
                                        <td>
                                            <asp:TextBox ID="txtDescription" runat="server" MaxLength="40" Width="251"></asp:TextBox></td>
                                            <td></td>
                                        <td></td>
                                       </tr>
                                       <tr>
                                           
                                       <td style="width: 150px" align="right"><asp:Label ID="lblShiftTimeFrom" runat="server" Text="Shift Time To"></asp:Label><em>*</em>
                                       </td>
                                       <td colspan="3">
                                        <table><tr> <td ><asp:TextBox ID="txtShiftTimeFrom" runat="server" MaxLength="5" Width="50"></asp:TextBox>
                                       </td>
                                       <td align="right">&nbsp;&nbsp;&nbsp;&nbsp;<asp:Label ID="lblShiftTimeTo" runat="server" Text="Shift Time To"></asp:Label><em>*</em>
                                       </td>
                                       <td ><asp:TextBox ID="txtShiftTimeTo" runat="server" MaxLength="5" Width="50"></asp:TextBox>
                                       </td></tr></table>
                                       </td>
                                   </tr>
                                   <tr>
                                       <td  align="right"><asp:Label ID="lblOrder" runat="server" Text="Order"></asp:Label><em>*</em>
                                       </td>
                                       <td colspan="3">
                                       <table><tr>
                                       <td ><asp:TextBox ID="txtOrder" runat="server" MaxLength="4" Width="50" onBlur="CheckInt(this)"></asp:TextBox>
                                       </td>
                                       <td >&nbsp;&nbsp;&nbsp;&nbsp;<asp:CheckBox ID="chkVoid" runat="server" Text="" TextAlign="Left" OnCheckedChanged="chkVoid_CheckedChanged" AutoPostBack="True" />
                                       </td>
                                       </tr></table>
                                       </td>
                                       
                                   </tr>
                                               
                                               
                                        
                                    <tr>
                                        <td colspan="4"><AjaxControlToolkit:MaskedEditExtender ID="MaskedEditExtender_FromTime" runat="server"
                                                   AutoComplete="true" AutoCompleteValue="00:00" Mask="99:99" MaskType="Time" TargetControlID="txtShiftTimeFrom">
                                               </AjaxControlToolkit:MaskedEditExtender>
                                               <AjaxControlToolkit:MaskedEditExtender ID="MaskedEditExtender_ToTime" runat="server"
                                                   AutoComplete="true" AutoCompleteValue="00:00" Mask="99:99" MaskType="Time" TargetControlID="txtShiftTimeTo">
                                               </AjaxControlToolkit:MaskedEditExtender></td>
                                            
                                        
                                    </tr>
                             
                                    
                                    <tr>
                                        <td colspan="4" align="right">
                                           
                                           <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" />
                                                <asp:Button ID="btnSaveAndReturn" runat="server" Text="Save And Return" OnClick="btnSaveAndReturn_Click" />
                                                <asp:Button ID="btnSaveAndNew" runat="server" Text="Save And New" OnClick="btnSaveAndNew_Click" />
                                                <asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClientClick="return Cancel()" />
                                           
                                           </td>
                                            
                                    </tr>
                                   </table>
                                </fieldset>
                             <!--**********context End *****************-->
                            </td>
                            </tr>
                            </table>
                            </td>
                          </tr>
                          <tr>
                            <td class="Page_Foot" colspan="2"  style="height: 54px"><WebStructure:PageFoot ID="PageFoot" runat="server" /></td>
                          </tr>
                       </table>                              
    </form>
</body>
</html>
